<div id="tb<?php echo $uniqid;?>" style="padding:0 8px 0 0;">
<form id="pagesaddfm" method="post">
	<table border="0" width="100%" cellspacing="1" cellpadding="5" class="formtable">
		<tr bgcolor="#FFFFFF">
			<td style="line-height:30px;"  width="10%">标题：</td>
			<td width="90%"><input name="title" type="text" style="width:400px;" class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入标题.."  required="true"></td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td style="line-height:30px;">关键词：</td>
			<td><input name="keywords" type="text" style="width:400px;"  class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入关键词.."></td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td style="line-height:30px;">排序：</td>
			<td><input name="status" type="checkbox" class="textbox-prompt" value="1" >激活</td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td style="line-height:30px;">内容：</td>
			<td>
			<script id="pagesaddEditor" name="content" type="text/plain"></script>
			</td>
		</tr>
		<tr>
			<td colspan="2" bgcolor="#F4F4F4" style="border-top:#ddd 1px solid;text-align:right;text-indent: 0">
			<div class="dialog-button">
			<a href="javascript:;" class="l-btn l-btn-small" onclick="pagesaddsubmitForm()"><span class="l-btn-left l-btn-icon-left"><span class="l-btn-text">保存</span><span class="l-btn-icon icon-ok">&nbsp;</span></span></a>
			<a href="javascript:;" class="l-btn l-btn-small" onclick="pagesaddclearForm()"><span class="l-btn-left l-btn-icon-left"><span class="l-btn-text">关闭</span><span class="l-btn-icon icon-no">&nbsp;</span></span></a>
			</div>
			</td>
		</tr>
</table>
</form>
</div>

<script>
/***关闭umeditor BOF***/
if(typeof(pagesaddum)!='undefined'){
		 pagesaddum.destroy();
}
/***关闭umeditor EOF***/
var pagesaddum = UM.getEditor('pagesaddEditor');
var pagesaddclearForm=function(){
	$('#pagesaddfm').form('clear');
	$('#rightTabs').tabs('close','添加页面');
}
var pagesaddsubmitForm=function(){
	$('#pagesaddfm').form('submit', {
			url:'/admin/pages/insert',
			success: function(data){
				var data = eval('(' + data + ')');

				if(data.ret==0){
						$.messager.show({
								title:'提示',
								msg:data.msg,
								timeout:3000,
								showType:'slide'
						});
						$('#pagesaddfm').form('clear');
						if(typeof($("#pages"))!='undefined') $("#pages").datagrid('reload');
						$('#rightTabs').tabs('close','添加页面');
				}else{
						$.messager.alert('提示',data.msg,'warning');
				}
			}
	});
}
</script>
